package cn.zwx.business.member.service.controller;

import cn.zwx.business.member.service.annotation.ZwxReference;
import cn.zwx.business.order.api.OrderService;
import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangwenxue
 */
@RestController
public class MemberController {

    @ZwxReference
    private OrderService orderService;


    @RequestMapping("/get/orderById")
    public String getOrderById(@RequestParam("orderId") Long orderId){
        return JSON.toJSONString(orderService.getOrderInfoById(orderId));
    }


    @RequestMapping("/get/orderList")
    public String getOrderList(){
        return JSON.toJSONString(orderService.getOrderList());
    }
}
